package dev.marsh.sniper.demo;

import android.content.Context;
import android.content.Intent;
import android.util.Log;
import android.view.View;
import android.widget.Toast;
import dev.marsh.sniper.SniperActivity;

public class FullActivity extends SniperActivity {
    private static final String TAG = "FullActivity";

    public static void start(Context context) {
        context.startActivity(new Intent(context, FullActivity.class));
    }

    @Override protected void result(boolean success) {
        if (BuildConfig.DEBUG) {
            Log.e(TAG, "Result is " + success);
        }

        if (success) {
            finish();
        }
    }

    @Override protected void photoResult(boolean success) {
        if (BuildConfig.DEBUG) {
            Log.e(TAG, "Photo Result is " + success);
        }

        if (success) {
            finish();
        }
    }

    @Override protected void doShare() {
        Toast.makeText(this, "分享", Toast.LENGTH_SHORT).show();
    }

    @Override public void onClick(View v) {
        if (v.getId() == R.id.ar) {
            setEnable(!isEnable());
            return;
        }
        super.onClick(v);
    }
}
